<div id="project-list">
  <h1>Listing Projects</h1>

  <table>
    <tr class="list-line-head">
      <th>Title</th>
      <th>Project Number</th>
      <th>Summary</th>
      <th>Description</th>
      <th>Actions</th>
    </tr>

    <% @projects.each do |project| %>
    <tr class="<%= cycle('list-line-odd', 'list-line-even') %>">
      <td><%= h project.title%></td>
      <td><%= h project.projectnum %></td>
      <td><%= h project.summary %></td>
      <td class="list-description"> <%= h truncate(project.description.gsub(/<.*?>/,''),:length => 80) %> </td>
      <td class="list-actions"> 
      	<%= link_to 'Show', project %><br />
        <%= link_to 'Edit', edit_project_path(project) %><br />
        <%= link_to 'Destroy', project, method: :delete, :data => { :confirm => 'Are you sure?' } %> 
      </td>
    </tr>
    <% end %>
  </table>

  <br />

  <%= link_to 'New Project', new_project_path %>

</div>